Aspects of the present invention relate to saving data and more particularly to a method, system and computer program product for saving multiple data items using partial-order planning.
In saving multiple data items, for example, by a server, there may be dependencies between the data items that require the data items to be stored in a particular order. For example, where the client wishes to create two items in one multipart request where the first item is a child of an existing resource on the server and the second item is a child of the first item, the client does not have a real ID for the first item since it has not be saved or created on the server. The second item needs a real ID of the first item in order to specify its parent. Under these circumstances the two items cannot be created in a single request because the real ID that the second item needs in order to be created is not yet available until the server responds from the request to create the first item with its real ID.